package org.sump.util;

import java.util.Collections;
import java.util.Set;

import org.sump.UMProvider;
import org.sump.data.HasGrants;
import org.sump.data.Permission;
import org.sump.data.Resource;
import org.sump.data.ResourceType;
import org.sump.data.Role;
import org.sump.data.Subject;

/**
 * Adapter for user management providers
 * @author Sergey Grigorchuk (sergey.grigorchuk@gmail.com)
 */
public abstract class UMProviderAdapter implements UMProvider {

	public void addRole(Role role) {
		throw new UnsupportedOperationException();
	}

	public void addSubject(Subject subject) {
		throw new UnsupportedOperationException();
	}

	public Set<Permission> getPermissions() {
		return Collections.emptySet();
	}

	public Set<ResourceType> getResourceTypes() {
		return Collections.emptySet();
	}

	public Set<Resource> getResources() {
		return Collections.emptySet();
	}

	public Set<Role> getRoles() {
		return Collections.emptySet();
	}

	public Set<Subject> getSubjects() {
		return Collections.emptySet();
	}

	public Subject getSubjectByName(String name) {
		throw new UnsupportedOperationException();
	}

	public void grant(HasGrants subject, Resource resource,
			Permission permission) {
		throw new UnsupportedOperationException();
	}

	public void removeGrant(HasGrants subject, Resource resource,
			Permission permission) {
		throw new UnsupportedOperationException();
	}

	public void removeRole(Role role) {
		throw new UnsupportedOperationException();
	}

	public void removeSubject(Subject subject) {
		throw new UnsupportedOperationException();
	}
}
